/*
 * @Author: 'zhangkeqq' '2211709169@qq.com'
 * @Date: 2025-07-24 15:34:56
 * @LastEditors: 'zhangkeqq' '2211709169@qq.com'
 * @LastEditTime: 2025-08-02 16:09:07
 * @FilePath: \vue3-admin\src\main.ts
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 */
import { createApp } from 'vue'
import './style/index.scss'
import App from './App.vue'
//引入路由
import router from './router'
import pinia from './store'
const app = createApp(App)
//svg插件需要配置代码
import 'virtual:svg-icons-register'
//导入element-plus
import ElementPlus from 'element-plus'
//element-plus样式
import 'element-plus/dist/index.css'
//引入element-plus icon
import * as ElementPlusIconsVue from '@element-plus/icons-vue'
//element 中文
import zhCn from 'element-plus/es/locale/lang/zh-cn'
for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
  app.component(key, component)
}


import piniaPersist from 'pinia-plugin-persistedstate';
//引入路由鉴权逻辑
import './permission'


// 使用 persist 插件
pinia.use(piniaPersist);

app.use(router)
app.use(pinia)
app.use(ElementPlus, {
  locale: zhCn,
})
app.use(ElementPlus)

app.mount('#app')
